cmake_minimum_required(VERSION 3.8)
project(path_plan)

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)  # 添加头文件路径

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(std_msgs REQUIRED)
find_package(moveit_ros_planning_interface REQUIRED)
find_package(Qt5 REQUIRED COMPONENTS Core Widgets)
find_package(control_msgs REQUIRED)

# 添加可执行文件
add_executable(cartesian_path src/cartesian_path.cpp)
ament_target_dependencies(cartesian_path rclcpp moveit_ros_planning_interface)

add_executable(path_es_1 src/path_es_1.cpp)
ament_target_dependencies(path_es_1 rclcpp moveit_ros_planning_interface)

add_executable(path_es_2 src/path_es_2.cpp)
ament_target_dependencies(path_es_2 rclcpp moveit_ros_planning_interface)

add_executable(path_es_3 src/path_es_3.cpp)
ament_target_dependencies(path_es_3 rclcpp moveit_ros_planning_interface)

add_executable(record_force src/record_force.cpp)
ament_target_dependencies(record_force rclcpp moveit_ros_planning_interface)

# 安装可执行文件
install(TARGETS path_es_2 path_es_3 path_es_1 record_force
  DESTINATION lib/${PROJECT_NAME}
)

install(DIRECTORY launch
  DESTINATION share/${PROJECT_NAME}
)


ament_package()
